"use strict";


var aa = 12
console.log(window.aa)

//浅拷贝
let obj2 = {name:'zf',age:18}
let newObj = Object.assign(obj2);
console.log(newObj)

let {name,age} = {name:"培训", age:9};
console.log(name, age);

let obj = {name:"培训", age:9, score:[100,90,80]};
let {...arg} = obj;
console.log(arg,obj);
console.log(arg === obj);

let con = [12,13,14,15,16];
let [...ary] = con;
console.log(ary);

let {name:A, age:B} = {name:'培训', age:9};
console.log(A,B);

let data = [
	{
		"name1": "张三",
		"age1": 25,
		"score": {
			"english": [100,90,95],
			"math": [100,100,100],
			"chinese": [98,99,100]
		}
	},
	{
		"name1": "李四",
		"age1": 24,
		"score": {
			"english": [50,60,70],
			"math": [99,98,97],
			"chinese": [100,96,98]
		}
	}
];

let [{name1, age1, score:{english:[A1], math:[,B1], chinese: [,,C1]}}] = data;
console.log(A1,B1,C1);


let obj1 = new Map();
obj1.set('x',10);
obj1.set('y',20);
for(let [key,value] of obj1){
	console.log(key,value);
}

